package actions.members;

import actions.base.BaseAction;

public class Delete extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6406933772018967198L;
	public String execute() {
		if (isPostBack)
		{
			services.deletePersonById(id);
			return redirect("Listing.action");
		}
		return "success";
	}
	
	int id;
	public void setId(int value) {id = value;}
	public int getId() {return id;	}

	boolean isPostBack;
	public void setIsPostBack(boolean value) {
		isPostBack = value;
	}
	
    public String getName() { 
    	return services.getPersonById(id).getName(); 
    }
}
